<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@taglib prefix="s" uri="/struts-tags" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<title>用户登录 -- 爱翼代理管理系统</title>
		
		<link href='<s:url value="/css/main.css" />' rel="stylesheet" type="text/css" />
		
		<style type="text/css">
		<!--
		body {
			background-image: url(<s:url value="/image/login_main_bg.jpg" />);
			font-size: 12;
		}
		-->
		</style>
		
		<script type="text/javascript">
			if (window != top) {
				
				top.location.href = location.href;
			}
		</script>
	</head>
	
	<body style="padding: 0px; text-align: center;" topmargin="0" leftmargin="0">
		<s:form id="login_form" action="login" method="post">
			
			<table border="0" align="center" cellpadding="0" cellspacing="0">
				<tr>
			    	<td style="width:100%; height: 100%; text-align: center">
			          <table border="0" cellpadding="0" cellspacing="0"  style="background-image:url(<s:url value="/image/login_main_subBG.jpg" />); width: 1024px; height: 730px;">
			            <tr style="height: 270px;">
			                <td style="width: 330px;"></td>
			                <td style="width: 300px;"></td>
			                <td style="width: 396px;"></td>
			            </tr>
			            <tr style="height: 180px;">
			                <td></td>
			                <td style=" vertical-align:text-top ">
			                	<table>
			                    	<tr height="35">
			                        	<td style="padding-left: 80px; width: 300px; text-align: left;">
			                            	<s:textfield id="userName" name="userName" cssClass="login_input" maxlength="20" />
			                            </td>
			                        </tr>
			                        <tr height="35">
			                        	<td style="padding-left: 80px; width: 300px; text-align: left;">
			                            	<s:password name="password" cssClass="login_input" maxlength="20" />
			                            </td>
			                        </tr>
			                        <tr height="35">
			                        	<td style="padding-left: 80px; width: 300px; text-align: left; vertical-align: inherit;">
			                            	<span style="padding-top: 10px;">
			                            	<s:textfield name="verifycode" cssStyle="width: 100px;" cssClass="login_input" maxlength="4" />
			                            	
										    <img src="<s:url value="/common/image.jsp" />" class="login_input" style="width: 93px; cursor:pointer;"
										    	onclick="javascript:this.src='<s:url value="/common/image.jsp?date=" />' + new Date()"
										    	alt="点击更换" title="点击更换" /></span>
			                            </td>
			                        </tr>
			                        <tr height="30" style="vertical-align:top">
			                        	<td style="text-align: left; padding: 5px;">
			                                <label id="error_msg" style="color: red; font: bold;"></label>
			                            </td>
			                        </tr>
			                        <tr>
			                        	<td>
			                                <img src="<s:url value="/image/login_main_loginButton.gif" />" style="cursor:pointer" alt="登录系统" onclick="uf_submit()" />
			                            </td>
			                        </tr>
			                    </table>
			                </td>
			                <td></td>
			            </tr>
			             <tr style="height: 280px;">
			                <td></td>
			                <td style=" "></td>
			                <td style=" "></td>
			            </tr>
			          
			          </table>
			        </td>
			    </tr>
			</table>
		</s:form>
	</body>
	
	<script type="text/javascript">
		
		<s:if test="#request.MESSAGE_CODE != null">
			
			var errorMsg = '<s:property value="%{getText(#MESSAGE_CODE)}"/>';
			
			if (errorMsg) {
				
				document.getElementById("error_msg").innerHTML = errorMsg;
			}
		
		</s:if>
		
		document.getElementById('userName').focus();
		
		function uf_submit() {
			
			document.getElementById("error_msg").innerText = "";
			
			login_form.submit();
		}
	
	</script>
</html>